import { users } from "../../types/user";
import { BaseRequest, BaseResponse, BaseConf } from "../base";
import { ObjectId } from "mongodb";

export interface ReqGetAllHWInfo extends BaseRequest {
  course: ObjectId;
  requiredHomework:ObjectId[]
}

export interface ResGetAllHWInfo extends BaseResponse {
  info:info[]
  students:safeStu[]
}

export interface info {
  name: string;
  userHomework: {
    student: ObjectId;
    score: number;
  }[];
}

export type safeStu = Pick<users,'_id' | 'name' | 'number'>

export const conf: BaseConf = {
  needRole: "teacher",
  needLogin: true,
};
